package com.webreport.model;

import java.util.Date;

import com.webreport.model.db.Report;
import com.webreport.utils.DateUtils;

public class ReportModel {
	private String reportid;
	private String reportname;
	private String accessurl;
	private String menuid;
	private String type;
	private String typename;
	private String projectname;
	private String createtime;
	private String updatetime;
	private String itowner;
	private String bussinessowner;
	private String description;
	private String purpose;
	private String rolenames;
	private long totalcount;
	private long usingtimes; 
	public ReportModel(){}
	public ReportModel(Report report){
		this.reportid = report.getReportid();
		this.reportname = report.getReportname();
		this.accessurl = report.getAccessurl();
		this.menuid = report.getMenuid();
		this.type = report.getType();
		this.typename = report.getTypename();
		this.projectname = report.getProjectname();
		this.setCreatetime(report.getCreatetime());
		this.setUpdatetime(report.getUpdatetime());
		this.setItowner(report.getItowner());
		this.bussinessowner = report.getBussinessowner();
		this.description = report.getDescription();
		this.purpose = report.getPurpose();
	}
	
	public String getReportid() {
		return reportid;
	}
	
	public void setReportid(String reportid) {
		this.reportid = reportid;
	}
	
	public String getReportname() {
		return reportname;
	}
	
	public void setReportname(String reportname) {
		this.reportname = reportname;
	}
	
	public String getAccessurl() {
		return accessurl;
	}
	
	public void setAccessurl(String accessurl) {
		this.accessurl = accessurl;
	}
	
	public String getMenuid() {
		return menuid;
	}
	
	public void setMenuid(String menuid) {
		this.menuid = menuid;
	}
	
	public String getType() {
		return type;
	}
	
	public void setType(String type) {
		this.type = type;
	}
	
	public String getTypename() {
		return typename;
	}
	
	public void setTypename(String typename) {
		this.typename = typename;
	}
	
	public String getProjectname() {
		return projectname;
	}
	
	public void setProjectname(String projectname) {
		this.projectname = projectname;
	}
	
	public String getCreatetime() {
		return createtime;
	}
	
	public void setCreatetime(Date createtime) {
		if (createtime != null)
			this.createtime = DateUtils.getDate(createtime, DateUtils.STD_DATE_FORMAT);
		else
			this.createtime = null;
	}
	
	public String getUpdatetime() {
		return updatetime;
	}
	
	public void setUpdatetime(Date updatetime) {
		if (updatetime != null)
			this.updatetime = DateUtils.getDate(updatetime, DateUtils.STD_DATE_FORMAT);
		else
			this.updatetime = null;
	}
	
	public String getItowner() {
		return itowner;
	}
	
	public void setItowner(String itowner) {
		this.itowner = itowner;
	}
	
	public String getBussinessowner() {
		return bussinessowner;
	}
	
	public void setBussinessowner(String bussinessowner) {
		this.bussinessowner = bussinessowner;
	}
	
	public String getDescription() {
		return description;
	}
	
	public void setDescription(String description) {
		this.description = description;
	}
	
	public String getPurpose() {
		return purpose;
	}
	
	public void setPurpose(String purpose) {
		this.purpose = purpose;
	}
	public String getRolenames() {
		return rolenames;
	}
	public void setRolenames(String rolenames) {
		this.rolenames = rolenames;
	}
	public long getTotalcount() {
		return totalcount;
	}
	public void setTotalcount(long totalcount) {
		this.totalcount = totalcount;
	}
	public long getUsingtimes() {
		return usingtimes;
	}
	public void setUsingtimes(long usingtimes) {
		this.usingtimes = usingtimes;
	}
	
}
